<include file="Home@Public/mobile_head"/>	
<link href="{:ADDON_PUBLIC_PATH}/card.css?v={:SITE_VERSION}" rel="stylesheet" type="text/css">
<body>
  <div class="container">  
          <div class="signin_top">
                <span class="signin_left">
                      <span class="signin_col"> {$user.score}</span><br/>         
                      可用积分
                </span>
                <empty name='has_log'>
                 <a class="signintop_mid" onClick="doSign(0)">
                         签到
                </a>
                <else/>
                  <a class="signintop_mid" onClick="doSign(1)">
                         已签到
                </a>
                </empty>
               
                <span class="signintop_right">
                         <span class="signin_col">{$day_count}</span><br/>             
                        签到次数
                </span>
           </div>
 
           <div class="i_nav">
                    <a href="{:U('score_exchange')}">
                           <img src="{:ADDON_PUBLIC_PATH}/gift_white.png" width="26">
                           <br>
                           积分兑换
                    </a>
                    <span class="i_line"></span>
                    <a href="{:U('sign_list')}">
                            <img src="{:ADDON_PUBLIC_PATH}/lists_white.png" width="26">
                            <br>
                            签到记录
                    </a>
                    <span class="i_line"></span>
                    <a href="{:U('score_method')}">
                            <img src="{:ADDON_PUBLIC_PATH}/score_method.png" width="26">
                            <br>
                            积分攻略
                    </a>
           </div> 
   
           <div class="i_bpp">
                 <p class="i_leftp">
                   <a href="{:addons_url('Card://Wap/signin')}&year={$year}&month={$month}&next=1" class="上一月">&nbsp;<img src="{:ADDON_PUBLIC_PATH}/i_left.png" height="30"></a>
                 </p>
                
                 <p class="i_midp">
                             {$year}年{$month}月
                 </p>
                 
                 <p class="i_rightp">
                     <a href="{:addons_url('Card://Wap/signin')}&year={$year}&month={$month}&next=2" class="下一月"><img src="{:ADDON_PUBLIC_PATH}/i_right.png" height="30" />&nbsp;</a>
                 </p>
           </div>
            
            <div class="signin_table">
                <div id="calendar">
                  
                </div>
            </div>
         <nav class="bottom_nav">
            <a class="icon_me_gray" href="{:addons_url('Card://Wap/me')}">我的</a>
            <a class="icon_card_gray" href="{:addons_url('Card://Wap/index')}">会员卡</a>
            <a class="icon_notice_gray" href="{:addons_url('Card://Wap/notice')}">最新通知
             <notempty name='notice_num'>
             <span class="red_circle">{$notice_num}</span>
             </notempty>
             <em></em>
            </a>
            <!--<a class="icon_ticket_gray" href="{:addons_url('Card://coupons/show')}">优惠券</a>-->
            <a class="icon_share_gray" href="{:addons_url('Card://Wap/share')}">分享</a>
            <a class="icon_signin_blue cur" href="{:addons_url('Card://Wap/signin')}">签到</a>
        </nav>
        <div class="bottom_nav_blank"></div>
 </div>
<script type="text/javascript" src="__STATIC__/jquery.calendar-widget.js"></script>
<script type="text/javascript">
var thelog = 0;
function doSign(log){
	
	if(log==1 || thelog ==1){
		var msg="{$has_msg}";
		if(msg != ""){
			$.Dialog.confirm('提示',msg);
		}
		return false;
	}
	$.Dialog.loading('正在签到...');
	var url="{:addons_url('Card://Wap/do_signin')}";
	$.post(url,function(data){
		if(data.status==1){
			thelog = 1;
			$.Dialog.confirm('提示',data.msg);
			setTimeout(function(){
				window.location.reload();
			},3500);
		}else{
			$.Dialog.confirm('提示',data.msg);
		}
	})
}
var sDay = '{$mDays}';
var sDayJson = new Array();
if(sDay!=''){
	sDayJson = JSON.parse(sDay);
}
$("#calendar").calendarWidget({
	month: {$month}-1,
	year: {$year},
	signDays:sDayJson					  
});
</script>
</body>
</html>
